Skip to content

Add haveibeenpwned password check#2642

Closed
AlexProgrammerDE wants to merge 4 commits intoAuthMe:masterfrom
AlexProgrammerDE:master
Closed

Add haveibeenpwned password check#2642
AlexProgrammerDE wants to merge 4 commits intoAuthMe:masterfrom
AlexProgrammerDE:master

Conversation

@AlexProgrammerDE
Copy link
Copy Markdown

This pull request adds a haveibeenpwned.com password check before allowing a user to register with a password.
This will hopefully force users to not use weak passwords, which are easy to crack due to comparing the stored hash with password lists. The password is sent hashed and only the first five characters of the hash to haveibeenpwned. Then the response is validated by AuthMe on the server, which is going through ~500 hashes returned by the API. So this is a very secure way of checking for how secure a password is.
example message with weak password

References:

It appears that there is a paid API, but from what I've seen, it is only for account breaches where you search by E-Mail, not by password. So I don't think there will be any rate limits this hits.
My discord is Pistonmaster#0001 (In AuthMe support discord server), let me know if there should be something changed here.

@sgdc3 sgdc3 requested review from ljacqu and sgdc3 January 1, 2023 04:08
@Xephi Xephi closed this Apr 20, 2026
@AlexProgrammerDE
Copy link
Copy Markdown
Author

@Xephi hello, what is the reason for you closing my pull request? I still want this feature shipped.

@AlexProgrammerDE
Copy link
Copy Markdown
Author

@Xephi I can redo this PR if the code wasn't to your liking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants